/**
 * 生成设备项 SVG 方法
 * @param {Object} data 传入 svg 所需数据
 * @return {String} 返回设备状态项 svg
 */
export const generateEquipmentItem = data => {
  return `
  <svg
    xmlns="http://www.w3.org/2000/svg"
    width="48"
    height="60"
    viewBox="0 0 48 60"
    fill="none"
    style="&#10;"
  >
    <text
      id="text"
      x="25"
      y="55"
      style="dominant-baseline:middle;text-anchor:middle;;font-size: 12px;"
      fill="white"
    >
      ${data.name}
    </text>
    <path
      d="M24 42C35.598 42 45 32.598 45 21C45 9.40202 35.598 0 24 0C12.402 0 3 9.40202 3 21C3 32.598 12.402 42 24 42Z"
      fill="url(#paint0_linear_238_184)"
    />
    <path
      d="M24 0.376104C19.8627 0.376104 15.8507 1.62984 12.4657 3.88656C9.14327 6.14327 6.51042 9.2776 5.00594 12.9761C2.31042 19.4328 2.99997 26.7672 6.88654 32.597C9.14325 35.9194 12.2776 38.5522 15.9761 40.1194C22.4328 42.8149 29.7672 42.1254 35.597 38.2388C38.9194 35.9821 41.5522 32.8478 43.1194 29.1493C45.8149 22.6925 45.1254 15.3582 41.2388 9.52835C38.9821 6.20596 35.8478 3.57313 32.1493 2.06865C29.5164 0.877604 26.8209 0.313418 24 0.376104ZM24 0C35.597 0 45 9.40299 45 21C45 32.597 35.597 42 24 42C12.403 42 3 32.597 3 21C3 9.40299 12.403 0 24 0Z"
      fill="#4EADFF"
    />
    <path
      opacity="0.9"
      d="M6 19.9055C6 20.2728 6.00006 20.7012 6.06138 21.0684C14.8916 25.5362 25.6227 21.9864 30.0991 13.1732C31.3868 10.6639 32 7.90978 32 5.09444C32 4.72722 32 4.2988 31.9387 3.93159C23.1085 -0.536231 12.3774 3.01354 7.901 11.8268C6.67459 14.3361 6 17.0902 6 19.9055Z"
      fill="url(#paint1_linear_238_184)"
    />
    <text
      xmlns="http://www.w3.org/2000/svg"
      id="text"
      x="24"
      y="24"
      style="dominant-baseline:middle;text-anchor:middle;;font-size: 12px;"
      fill="white"
    >
      ${data.stateText}
    </text>
    <defs>
      <linearGradient
        id="paint0_linear_238_184"
        x1="18.5735"
        y1="2.88022"
        x2="29.8265"
        y2="40.2781"
        gradientUnits="userSpaceOnUse"
      >
        <stop />
        <stop offset="0.498" stop-color="#001A2E" />
        <stop offset="0.745" stop-color="#002F53" />
        <stop offset="1" stop-color="#0090FF" />
      </linearGradient>
      <linearGradient
        id="paint1_linear_238_184"
        x1="25.3212"
        y1="18.7895"
        x2="16.8093"
        y2="5.69993"
        gradientUnits="userSpaceOnUse"
      >
        <stop stop-color="#A4BFFF" stop-opacity="0.102" />
        <stop offset="1" stop-color="#4099FF" stop-opacity="0.502" />
      </linearGradient>
    </defs>
  </svg>`;
};
